#include <iostream>
#include <pthread.h>
#include <string>
#include <unistd.h>
#include <string.h>
#include <thread>

int main()
{
    std::thread t1([]()
                   {
        while(true)
        {
            std::cout<<"我是子线程: thread -1"<<std::endl;
            sleep(1);
        } });

    while (true)
    {
        std::cout << "我是父线程" << std::endl;
        sleep(1);
    }
}